<template>
	<view>
		
		<!-- 收货地址 -->
		<my-address></my-address>
		
		<!-- 商品列表的标题 -->
		<view class="cart-title">
			<uni-icons type="shop" size="18"></uni-icons>
			
			<!-- 文本 -->
			<text class="cart-title-text">购物车</text>
		</view>
		
		<!-- 循环渲染购物车信息 -->
		<block v-for="(goods, i) in cart" :key="i">
			<my-goods :goods="goods" :show-radio="true"></my-goods>
		</block>
	</view>
</template>

<script>
	import badgeMix from '@/mixins/tabbar-badge.js'
	import {mapState} from 'vuex'
	
	export default {
		mixins:[badgeMix],
		computed:{
			...mapState('m_cart', ['cart'])
		},
		data() {
			return {
				
			};
		}
		
	}
</script>

<style lang="scss">

.cart-title {
	height: 40px;
	display: flex;
	align-items: center;
	padding-left: 5px;
	border-bottom: 1px solid #efefef;
	
	.cart-title-text{
		font-size: 14px;
		margin-left: 10px;
	}
}
</style>
